<@app.html>
    <@app.head>
    </@app.head>

    <@app.body>
        <@app.container>
            <@app.banner/>
        <div class="main">
            <@app.menu/>
            <div class="content">
                <div class="panel settings_wrap">
                    <form method="post">
                        <div class="settings_body">
                            <fieldset>

                                <legend>用户充值优惠</legend>
                                <div class="ui_table">
                                    <table cellpadding="0" cellspacing="0">
                                        <#list 1..10 as e>
                                            <#assign money=0>
                                            <#assign gift=0.00>

                                            <#if customerGiftList?? && e_index lt customerGiftList?size>
                                                <#assign money=customerGiftList[e_index].money>
                                                <#assign gift=customerGiftList[e_index].getGift()>
                                            </#if>

                                            <tr>
                                                <td width="100" align="right">用户充值：</td>
                                                <td><input type="text" class="text easyui-numberspinner"
                                                           style="width:110px; height: 28px;" name="money"
                                                           data-options="min:0,precision:2" value="${money/100}"
                                                           required="required"/>&nbsp;元
                                                </td>
                                                <td width="100" align="right">赠送：</td>
                                                <td><input type="text" class="text easyui-numberspinner"
                                                           style="width:110px; height: 28px;" name="gift"
                                                           data-options="min:0, precision:2"
                                                           value="${gift?string('0.00')}" required="required"/>&nbsp;元
                                                </td>
                                            </tr>
                                        </#list>
                                    </table>
                                </div>
                            </fieldset>
                        </div>
                    </form>
                    <div class="settings_btn">
                        <@app.has_oper oper_code='3_6_2'>
                            <button class="btn btn_red ok">保 存</button>
                        </@app.has_oper>
                        <button class="btn btn_border close">重 置</button>
                    </div>
                </div>
            </div>
        </div>
        </@app.container>
    </@app.body>
</@app.html>
<script>
    (function () {

        var form = $('form');

        $('button.ok').click(function () {
            form.form('submit', {
                url: '${contextPath}/security/basic/customer_deposit_gift/update.htm',
                success: function (text) {
                    var json = $.evalJSON(text);
                <@app.json_jump/>
                    if (json.success) {
                        $.messager.alert('提示信息', '操作成功', 'info');
                        document.location.href = '${contextPath}/security/basic/customer_deposit_gift/index.htm'
                    } else {
                        $.messager.alert('提示信息', json.message, 'info');
                    }
                }
            });
        });
        $('button.close').click(function () {
            document.location.href = '${contextPath}/security/basic/customer_deposit_gift/index.htm'
        });

    })()
</script>

